import http from "@/http"

//获取客户列表信息
export const getCustomerApi = (params: ICustomerListParams): RES<ICustomerListModel> => http.get(`/prod-api/customer?pageNum=${params.pageNum}&pageSize=${params.pageSize}`, { params })

//获取用户信息
export const getCustomerUserApi = (id: number): RES<ICustomerModel> => http.get(`/prod-api/customer/${id}`)

//修改客户信息
export const editCustomerApi = (params: ICustomerModel): RES<ICustomerModel> => http.put(`/prod-api/customer`, params)

//添加用户
export const AddCustomerUserApi = (params: ICustomerModel): RES<ICustomerModel> => http.post(`/prod-api/customer`, params)

//获取全部用户的信息
export const AllCustomerApi = (): RES<IAddCustomer> => http.get("/prod-api/system/user/all")

//导出数据
export const ExportApi = (params: any, config: any): RES<any> => http.post("/prod-api/customer/export", params, config)

//获取拜访记录
export const getVisitApi = (params: ICustomerListParams): RES<IVisitCustomer> => http.get(`/prod-api/customer/visit?pageNum=${params.pageNum}&pageSize=${params.pageSize}`, { params })

//拜访方式
export const VisitThingApi = (): RES<any> => http.get("/prod-api/system/dict/data/type/customer_visit_method")